<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>demo</title>
    <script src="/js/jquery-1.7.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        function LimitTextArea(field){
            maxlimit=200;
            if (field.value.length > maxlimit)
                field.value = field.value.substring(0, maxlimit);

        }
    </script>

</head>
<body style="font-size:12px;font-family:verdana,tahoma,arial;">
<form action="/dm/{{ to_user }}/"  method="post">{% csrf_token %}
    发私信给{{ to_user }}<br>
    <textarea name="content" cols="40" rows="5" onKeyDown="LimitTextArea(this)" onKeyUp="LimitTextArea(this)" onkeypress="LimitTextArea(this)"></textarea>
    <input type="submit" name="提交">
</form>
</body>
</html>